package com.sniff.atp.manager.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sniff.atp.entity.ToolsInfo;
import com.sniff.atp.manager.ToolsInfoMananager;
import com.sniff.atp.mapper.ToolsInfoMapper;
import com.sniff.atp.utils.DateUtil;
import org.springframework.stereotype.Service;

/**
 * @BelongsProject: sniff-atp
 * @BelongsPackage: com.sniff.atp.manager.impl
 * @Author: zxy
 * @CreateTime: 2023-04-25 21:02
 * @Description:
 * @Version: 1.0
 */
@Service
public class ToolsInfoManagerImpl extends ServiceImpl<ToolsInfoMapper, ToolsInfo> implements ToolsInfoMananager {

    @Override
    public void saveOne(ToolsInfo toolsInfo){
        toolsInfo.setCreateTime(DateUtil.date());
        this.save(toolsInfo);
    }

    @Override
    public ToolsInfo selectOne(Long id){
        return this.getById(id);
    }

    @Override
    public void updateOne(ToolsInfo toolsInfo) {
        toolsInfo.setUpdateTime(DateUtil.date());
        this.updateById(toolsInfo);
    }

    @Override
    public void delete(Long id){
        this.removeById(id);
    }


}
